#ifndef _BASESTATE_H
#define _BASESTATE_H

// Globabl enumeration to switch between the different GameStates
enum GameStates{TITLE,OVERWORLD,PAUSEMENU,BATTLE,GAMEOVER};

// Context class which tells the game which state to go to
class GameState
{
public:
	//function used to change the states of the game
	void SetState(GameStates gState)
	{
		m_gameState = gState;
	}
private:
	//enumeration used to depict the States of the game
	GameStates m_gameState;
};

//Base state class that the other game states all derive from
class BaseState
{
protected:
	//GameState to return and switch between in all of the derived classes
	GameState* m_State;
public:
	//Returns which state the game is currently in
	GameState* getState()
	{
		return m_State;
	}
	//Creates a new state object
	void CreateNewState()
	{
		m_State =  new GameState;
	}

	//Virtual functions to be defined by each of the different state classes
	virtual void Create(IDirect3DDevice9* m_pD3DDevice) = 0;
	virtual void Render() = 0;
	virtual void Update() = 0;
	virtual void Destroy() = 0;
};

#endif